#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
	int n=0, s = 0, t;
	cin >> n;
	bool num = false;
	if (n < 0)
	{
		num = true;
		n = -1 * n;
	}
	while (n != 0)
	{
		t = n % 10;
		n /= 10;
		s = s * 10 + t;
	}
	if (num)
	{
		s = -1 * s;
	}
	cout << s;
	return 0;

}